﻿#ifndef HTTP_H
#define HTTP_H
#include <QMainWindow>
#include"database.h"
#include<QDate>

class http:public QObject

{

     Q_OBJECT

public:

    http();

    QByteArray get(const QString &strUrl);

    QByteArray post(const QString &strUrl, QByteArray data);

    QStringList search(QString regulardata,QString data);

    QString date_form(QString time);

    QString date_format(QString time_data);

    virtual QString search_next_page(QString data)=0;

    virtual QString search_final_page(QString data)=0;

    virtual QStringList search_url(QString data)=0;

    virtual QStringList search_date(QString data)=0;

    virtual QStringList search_data(QString data)=0;

    virtual bool dealing()=0;

protected:

    database* db;

    QString starturl,weburl,nexturl,indexpage,finalurl;

    QStringList lecture_list;

    QStringList lecture_date_list;

    QDate lecture_date;

    QStringList lecture_data;

    QString last_lecture;

    QDate current_date;


};

#endif // HTTP_H
